#include<stdio.h>
int f(int x,int y)
{
  return x>y?x:y;
}

int main()
{
   int a,b,c,d;
   scanf("%d",&a);
   scanf("%d",&b);
   scanf("%d",&c);
   scanf("%d",&d);
   printf("%d",f(a,f(b,f(c,d))));
    return 0;
}